package com.summer.obj.a;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class TestOBJ {

	public static void main(String[] args) {
		Calendar cl = Calendar.getInstance(); 
		cl.set(2024, 9, 30);
		
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyy-MM-dd");
		System.out.println(dateFormat.format(cl.getTime()));
		

		System.out.println(dateFormat.format(new Date(2024, 9, 30)));
		System.out.println(dateFormat.format(new Date(2024-1900, 9, 30)));
		
		// 一般我们会用这个比较多
//		GregorianCalendar
	}
	
}
